@extends("admin.base.index")

@section("content")
	<div class="block-area" id="text-input">
        <h3 class="block-title">修改</h3>
        <form action='{{ url("admin/user") }}/{{ $user->userid }}' method='post'>
            <input type='hidden' name='_token' value='{{ csrf_token() }}'>
            <input type='hidden' name='_method' value='PUT'>
            <div class="row">
                <div class="col-lg-4">
                    账号：<input name='username' type="text" class="form-control m-b-10" placeholder="姓名" value='{{ $user->username }}'>
                </div>
                <div class="col-lg-4">
                    密码：<input name='userpassword' type="text" class="form-control m-b-10" placeholder="密码" value='{{ $user->userpassword }}'>
                </div>
                <div class="col-lg-4">
                    性别：<select class="form-control" name="sex" >
                                <option value="1">男</option>
                                <option value="2">女</option>
                           </select>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-4" >
                    年龄<input name='age' type="text" class="form-control m-b-10" placeholder="年龄" value='{{ $user->age }}'>
                </div>
                <div class="col-lg-4">
                    联系方式：<input name='phone' type="text" class="form-control m-b-10" placeholder="联系方式" value='{{ $user->phone }}'>
                </div>
                <div class="col-lg-4">
                    邮箱：<input name='email' type="text" class="form-control m-b-10" placeholder="邮箱" value='{{ $user->email }}'>
                </div>
                <div class='row'>
                    <div class="col-lg-12">
                        <input type='submit' class='btn' value='修改'>
                    </div>
                </div>
            </div>
        </form>
        @if (count($errors) > 0)
                    <div class="alert alert-danger">
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                @endif
    </div>        
@stop